import React, { Component } from 'react';
import styles from './index.less';
import { Descriptions } from 'antd';

class Fiveitem extends Component {
  render() {
    const { title, style, text, data = {} } = this.props;

    return (<div className={styles.fiveWrap} style={{ ...style }}>
      <Descriptions column={6} layout="vertical" bordered>
        <Descriptions.Item label={title.first}><span style={{ fontWeight: 'bold' }}>{text}</span></Descriptions.Item>
        <Descriptions.Item
          label={title.second}>
          {data.lend_number1 === '' ? '无记录' : data.lend_number1 + '次'}<br/>
          {data.lend_money1 === '' ? '无记录' : data.lend_money1 + '元'}
        </Descriptions.Item>
        <Descriptions.Item
          label={title.three}>{data.lend_number3 === '' ? '无记录' : data.lend_number3 + '次'}<br/>
          {data.lend_money3 === '' ? '无记录' : data.lend_money3 + '元'}
        </Descriptions.Item>
        <Descriptions.Item
          label={title.four}>{data.lend_number6 === '' ? '无记录' : data.lend_number6 + '次'}<br/>
          {data.lend_money6 === '' ? '无记录' : data.lend_money6 + '元'}
        </Descriptions.Item>
        <Descriptions.Item
          label={title.five}>{data.lend_number12 === '' ? '无记录' : data.lend_number12 + '次'}<br/>
          {data.lend_money12 === '' ? '无记录' : data.lend_money12 + '元'}
        </Descriptions.Item>
        <Descriptions.Item
          label={title.six}>{data.lend_number24 === '' ? '无记录' : data.lend_number24 + '次'}<br/>
          {data.lend_money24 === '' ? '无记录' : data.lend_money24 + '元'}
        </Descriptions.Item>
      </Descriptions>
    </div>)
  }
}

export default Fiveitem;
